home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / ip / ka9q / alpha.arc / ATDUMP.C < prev    next >
C/C++ Source or Header  |  1987-12-22  |  462b  |  27 lines

  1. #include <stdio.h>
  2. #include "global.h"
  3. #include "mbuf.h"
  4. #include "mac_AT.h"
  5. #include "trace.h"
  6.  
  7. at_dump(bpp)
  8. struct mbuf **bpp;
  9. {
  10.     struct    appletalk ap;
  11.     char s[20],d[20];
  12.  
  13.     ntohat(&ap,bpp);
  14.     pat(s,ap.source);
  15.     pat(d,ap.dest);
  16.     printf("AppleTalk: %s->%s type 0x%x len %u\r\n",s,d,ap.type,
  17.         APPLEADDRLEN + len_mbuf(*bpp));
  18.     switch(ap.type){
  19.         case AIP_TYPE:
  20.             ip_dump(bpp);
  21.             break;
  22.         case AARP_TYPE:
  23.             arp_dump(bpp);
  24.             break;
  25.     }
  26. }
  27.